(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/index/select-city" ], {
    "2ced": function(t, n, i) {
        (function(t) {
            i("767a"), e(i("66fd"));
            var n = e(i("d776"));
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = i, t(n.default);
        }).call(this, i("543d").createPage);
    },
    "38f7": function(t, n, e) {
        var i = e("d737");
        e.n(i).a;
    },
    "75d1": function(t, n, e) {
        e.r(n);
        var i, o = e("8cfa"), c = e.n(o);
        for (i in o) "default" !== i && function(t) {
            e.d(n, t, function() {
                return o[t];
            });
        }(i);
        n.default = c.a;
    },
    "8cfa": function(t, e, i) {
        (function(o) {
            function n(n, t) {
                var e, i = Object.keys(n);
                return Object.getOwnPropertySymbols && (e = Object.getOwnPropertySymbols(n), t && (e = e.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(n, t).enumerable;
                })), i.push.apply(i, e)), i;
            }
            Object.defineProperty(e, "__esModule", {
                value: !0
            });
            var t = {
                components: {},
                data: function() {
                    return {
                        cityList: [],
                        locationIsOpen: !0
                    };
                },
                onLoad: function() {
                    this.init();
                },
                onShow: function() {},
                computed: function(i) {
                    for (var t = 1; t < arguments.length; t++) {
                        var o = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? n(Object(o), !0).forEach(function(t) {
                            var n, e;
                            n = i, t = o[e = t], e in n ? Object.defineProperty(n, e, {
                                value: t,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : n[e] = t;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(o)) : n(Object(o)).forEach(function(t) {
                            Object.defineProperty(i, t, Object.getOwnPropertyDescriptor(o, t));
                        });
                    }
                    return i;
                }({}, (e.default = void 0, i("26cb").mapState)({
                    location: function(t) {
                        return t.init.location;
                    }
                })),
                methods: {
                    init: function() {
                        this.getCitys();
                    },
                    getCitys: function() {
                        var i = this, o = this;
                        this.$api("index.select_city_init", {}).then(function(t) {
                            t = t.data.list;
                            o.cityList = t, o.$store.commit("cityList", t);
                            var n = !1, e = i.location.city;
                            t.map(function(t) {
                                t.city_name == e && (n = !0);
                            }), i.locationIsOpen = n;
                        });
                    },
                    selectCity: function(t) {
                        t = this.cityList[t], t = {
                            cityId: t.id,
                            cityName: t.city_name
                        };
                        o.setStorageSync("time", 0), this.$store.commit("cityArea", t), this.$Router.pushTab({
                            path: "/pages/index/index"
                        });
                    },
                    getLocation: function() {
                        console.info(222);
                        var n = this;
                        o.getLocation({
                            type: "gcj02 ",
                            
                            success: function(t) {
                                t.latitude, t.longitude, n.$api("index.getLocation", {
                                    lat: t.latitude,
                                    lng: t.longitude
                                }).then(function(t) {
                                    n.$store.commit("location", t.data.location), n.getCitys();
                                });
                            },
                            fail: function(t) {
                                console.info(t);
                            }
                        });
                    },
                    chooseLocation: function() {
                        var i = this;
                        this.locationIsOpen && this.cityList.forEach(function(t, n, e) {
                            t.city_name == i.location.city && (t = {
                                cityId: t.id,
                                cityName: t.city_name
                            }, i.$store.commit("cityArea", t), o.setStorageSync("time", 0), i.$Router.pushTab({
                                path: "/pages/index/index"
                            }));
                        });
                    }
                }
            };
            e.default = t;
        }).call(this, i("543d").default);
    },
    a3c2: function(t, n, e) {
        e.d(n, "b", function() {
            return i;
        }), e.d(n, "c", function() {
            return o;
        }), e.d(n, "a", function() {});
        var i = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    },
    d737: function(t, n, e) {},
    d776: function(t, n, e) {
        e.r(n);
        var i, o = e("a3c2"), c = e("75d1");
        for (i in c) "default" !== i && function(t) {
            e.d(n, t, function() {
                return c[t];
            });
        }(i);
        e("38f7");
        var a = e("f0c5"), o = Object(a.a)(c.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        n.default = o.exports;
    }
}, [ [ "2ced", "common/runtime", "common/vendor" ] ] ]);